&lt;cfcomponent&gt;
	&lt;cfset variables.resourceLink = structNew() /&gt;
	&lt;cfset variables.resourcePath = structNew() /&gt;
	&lt;cfset variables.env_context = rereplace(application.env.context,'[\.]','/','ALL') /&gt;
	&lt;cffunction name="init"&gt;
		&lt;cfreturn this /&gt;
	&lt;/cffunction&gt;
	
	&lt;cffunction access="public" returntype="Any" name="get_resources_links"&gt;
		&lt;cfset var resource =  StructNew() />
		&lt;cfset var server_path = "http://#cgi.server_name#" /&gt;
		
		&lt;cfif cgi.server_port neq 80&gt;
			&lt;cfset server_path = "http://#cgi.server_name#:#cgi.server_port#" /&gt;
		&lt;/cfif&gt;
		
		&lt;cfset resource["relative_path"]= "#server_path#/#variables.env_context#/" /&gt;
		
		&lt;cfreturn trim(resource["relative_path"]) /&gt;
	&lt;/cffunction&gt;
	
	&lt;cffunction access="public" returntype="Any" name="get_links"&gt;
		&lt;cfargument name="resource" required="true" type="string" hint="Each model in your application is a resource" /&gt;
		&lt;cfargument name="resource_id" required="false" type="string" hint="For multiple foreign keys, provide resource_id in the form key1/value/key2/value. For e.g. 'user_id/13/department_id/20'. Note there is no leading or trailing slashes"/&gt;
		
		&lt;cfset server_path = "http://#cgi.server_name#" /&gt;
		&lt;cfif cgi.server_port neq 80&gt;
			&lt;cfset server_path = "http://#cgi.server_name#:#cgi.server_port#" /&gt;
		&lt;/cfif&gt;
		
		&lt;cfif application.env.pretty_urls eq false&gt;
			&lt;cfset variables.resourceLink["relative_path"]= "#server_path#/#variables.env_context#/index.cfm?" /&gt;
		&lt;cfelse&gt;
			&lt;cfset variables.resourceLink["relative_path"]= "#server_path#/#variables.env_context#/" /&gt;
		&lt;/cfif&gt;	
		
		&lt;cfset variables.resourceLink["index"] 	= '&lt;a href="#resourceLink["relative_path"]##arguments.resource#/index"&gt;Index&lt;/a&gt;' /&gt;
		&lt;cfset variables.resourceLink["cancel"] 	= '&lt;a href="#resourceLink["relative_path"]##arguments.resource#/index"&gt;Cancel&lt;/a&gt;' /&gt; &lt;!--- alias ---&gt;
		&lt;cfset variables.resourceLink["back"] 	= '&lt;a href="#resourceLink["relative_path"]##arguments.resource#/index"&gt;Back&lt;/a&gt;' /&gt; &lt;!--- alias ---&gt;
		&lt;cfset variables.resourceLink["new"] 	= '&lt;a href="#resourceLink["relative_path"]##arguments.resource#/new"&gt;Create new #arguments.resource#&lt;/a&gt;' /&gt;
		
		&lt;cfif isDefined('arguments.resource_id') AND arguments.resource_id NEQ ''&gt;
			&lt;cfset variables.resourceLink["show"] 	= '&lt;a href="#resourceLink["relative_path"]##arguments.resource#/show/#arguments.resource_id#"&gt;Show&lt;/a&gt;' /&gt;
			&lt;cfset variables.resourceLink["edit"] 	= '&lt;a href="#resourceLink["relative_path"]##arguments.resource#/edit/#arguments.resource_id#"&gt;Edit&lt;/a&gt;' /&gt;
			&lt;cfset variables.resourceLink["delete"] = '&lt;a href="#resourceLink["relative_path"]##arguments.resource#/delete/#arguments.resource_id#"&gt;Delete&lt;/a&gt;' /&gt;
		&lt;/cfif&gt;
		
		&lt;cfreturn variables.resourceLink /&gt;
	&lt;/cffunction&gt;
	
	&lt;cffunction access="public" returntype="Any" name="get_paths"&gt;
		&lt;cfargument name="resource" required="true" type="string" hint="Each model in your application is a resource" /&gt;
		&lt;cfargument name="resource_id" required="false" type="string" hint="For multiple foreign keys, provide resource_id in the form key1/value/key2/value. For e.g. 'user_id/13/department_id/20'. Note there is no leading or trailing slashes"/&gt;
		
		&lt;cfif application.env.pretty_urls eq false&gt;
			&lt;cfset variables.resourcePath["relative_path"]= "/#variables.env_context#/index.cfm?" /&gt;
		&lt;cfelse&gt;
			&lt;cfset variables.resourcePath["relative_path"]= "/#variables.env_context#/" /&gt;
		&lt;/cfif&gt;	
		
		&lt;cfset variables.resourcePath["index"] 	= '#resourcePath["relative_path"]##arguments.resource#/index' /&gt;
		&lt;cfset variables.resourcePath["new"] 	= '#resourcePath["relative_path"]##arguments.resource#/new' /&gt;
		&lt;cfset variables.resourcePath["update"] = '#resourcePath["relative_path"]##arguments.resource#/update' /&gt;&lt;!--- values via form post ---&gt;
		&lt;cfset variables.resourcePath["create"] = '#resourcePath["relative_path"]##arguments.resource#/create' /&gt;&lt;!--- values via form post ---&gt;
		
		&lt;cfif isDefined('arguments.resource_id') AND arguments.resource_id NEQ ''&gt;
			&lt;cfset variables.resourcePath["show"] 	= '#resourcePath["relative_path"]##arguments.resource#/show/#arguments.resource_id#' /&gt;
			&lt;cfset variables.resourcePath["edit"] 	= '#resourcePath["relative_path"]##arguments.resource#/edit/#arguments.resource_id#' /&gt;
			&lt;cfset variables.resourcePath["delete"] = '#resourcePath["relative_path"]##arguments.resource#/delete/#arguments.resource_id#' /&gt;
		&lt;/cfif&gt;
		&lt;cfreturn variables.resourcePath /&gt;
	&lt;/cffunction&gt;
&lt;/cfcomponent&gt;